/*
 * @Author: wmm834578987 53178191+wmm834578987@users.noreply.github.com
 * @Date: 2024-04-26 17:52:53
 * @LastEditors: 王明明834578987 10266004+wang-mingming-834578987@user.noreply.gitee.com
 * @LastEditTime: 2024-05-13 18:21:34
 * @FilePath: \imageManager\src\assets\type\common.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export function isValidKey(key: string | number | symbol, object: object): key is keyof typeof object {
    return key in object;
}

export interface Result<T = any> {
    code: number | string;
    msg: string;
    data?: T;
}

export interface PagerList {
    picId: number;
    picUrl: string;
    format: string;
    pngStatus?: string;
    svgStatus?: string;
    picTag?: string;
    downloadTime: string;
    src: string;
    id?: string | number
}


export interface Daum {
    coverUrl?: string
    favoriteId?: number | null
    favorite: string
    status: number | string
}
export type FavoriteList = Daum[]


export type HistoryData = PagerList[]


export type TagList = Tag[]

export interface Tag {
    value: string
    key: string
    selected: boolean
}


export interface QueryParam {
    searchTag: string
    type: string
    format: string
    page: number
    limit: number
}



export type BannerList = BannerItem[];
export interface BannerItem {
    listId: number
    listUrl: string
    listName: string
}


export interface userInfo {
    access_type: string
    account: string
    aud: string
    exp: number | string
    password: string
}

export interface ImgInfo {
    createTime: string
    downloadCount: number
    id: number
    isDeleted: number
    listId: any
    picName: string
    picTag: string
    picType: string
    picUrl: string
    pngStatus: string
    src: string
    svgStatus: string
    teaVisible: number
    updateTime: string
    version: string
}

export type ImgList = ImgInfo[]